<template>
  <!-- 基本信息 -->
  <div class="bg-white my-[10px]">
    <BaseHead style="border-bottom: 0">基本信息</BaseHead>
    <BaseTable>
      <tr>
        <td class="td-name">评审方案名称</td>
        <td colspan="3" style="width: 87.5%">{{ detailData.name }}</td>
      </tr>
      <tr>
        <td class="td-name">满分</td>
        <td colspan="3">{{ detailData.fullMark }}（分）</td>
      </tr>
    </BaseTable>
  </div>
  <!-- 评审标准 -->
  <div class="bg-white mt-[10px]">
    <BaseHead style="border-bottom: 0"> 评审标准 </BaseHead>
    <el-table :data="detailData.items" class="w-full" border>
      <el-table-column prop="lv1name" label="一级标准" />

      <el-table-column label="二级标准">
        <template #default="{ row }">
          <p clearable v-for="(item, index) in row.lv2" :key="index" class="py-[2px]">
            {{ item.lv2name }}
          </p>
        </template>
      </el-table-column>
      <el-table-column label="分数" width="150">
        <template #default="{ row }">
          <p clearable v-for="(item, index) in row.lv2" :key="index" class="py-[2px]">
            {{ item.lv2mark }}
          </p>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>
import BaseHead from "@/views/project/components/BaseHead.vue";
import BaseTable from "@/views/project/components/BaseTable.vue";
import { recordsDetail } from "@/api/project/xj/psfasz";
const props = defineProps({
  operateId: String,
});
const detailData = ref({});
//获取记录详情
const getDetail = async () => {
  try {
    const params = {
      id: props.operateId,
    };
    const res = await recordsDetail(params);
    detailData.value = res.data;
  } catch (error) {
    console.log(error);
  }
};
onMounted(() => {
  getDetail();
});
</script>

<style scoped lang="scss"></style>
